/*
*Copyright 2021-2023 NERCIS
*
*Licensed under the Apache License, Version 2.0 (the "License");
*you may not use this file except in compliance with the License.
*You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*Unless required by applicable law or agreed to in writing, software
*distributed under the License is distributed on an "AS IS" BASIS,
*WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*See the License for the specific language governing permissions and
*limitations under the License.
*/

package cn.ac.nercis.pes.community.model.vo.asset;

import javafx.beans.property.SimpleStringProperty;
import org.apache.commons.lang3.StringUtils;

/**
 * 资产重要数据信息修改视图模型
 * @author zpy
 * @version 1.0.0
 */
public class AssetKeyDataVO extends BaseAssetVO{
    private final SimpleStringProperty systemId = new SimpleStringProperty();
    private final SimpleStringProperty data = new SimpleStringProperty();
    private final SimpleStringProperty describe = new SimpleStringProperty();
    private final SimpleStringProperty ownedApp = new SimpleStringProperty();
    private final SimpleStringProperty location = new SimpleStringProperty();
    private final SimpleStringProperty require = new SimpleStringProperty();
    private final SimpleStringProperty desc = new SimpleStringProperty();
    private final SimpleStringProperty ownedAppAssetId = new SimpleStringProperty();
    private final SimpleStringProperty locationAssetId = new SimpleStringProperty();

    public String getSystemId() {
        return systemId.get();
    }

    public SimpleStringProperty systemIdProperty() {
        return systemId;
    }

    public void setSystemId(String systemId) {
        this.systemId.set(systemId);
    }

    public String getData() {
        return data.get();
    }

    public SimpleStringProperty dataProperty() {
        return data;
    }

    public void setData(String data) {
        if(!StringUtils.equals(getData(),data)){
            change = true;
        }
        this.data.set(data);
    }

    public String getDescribe() {
        return describe.get();
    }

    public SimpleStringProperty describeProperty() {
        return describe;
    }

    public void setDescribe(String describe) {
        if(!StringUtils.equals(getDescribe(),describe)){
            change = true;
        }
        this.describe.set(describe);
    }

    public String getOwnedApp() {
        return ownedApp.get();
    }

    public SimpleStringProperty ownedAppProperty() {
        return ownedApp;
    }

    public void setOwnedApp(String ownedApp) {
        if(!StringUtils.equals(getOwnedApp(),ownedApp)){
            change = true;
        }
        this.ownedApp.set(ownedApp);
    }

    public String getLocation() {
        return location.get();
    }

    public SimpleStringProperty locationProperty() {
        return location;
    }

    public void setLocation(String location) {
        if(!StringUtils.equals(getLocation(),location)){
            change = true;
        }
        this.location.set(location);
    }

    public String getRequire() {
        return require.get();
    }

    public SimpleStringProperty requireProperty() {
        return require;
    }

    public void setRequire(String require) {
        if(!StringUtils.equals(getRequire(),require)){
            change = true;
        }
        this.require.set(require);
    }

    public String getDesc() {
        return desc.get();
    }

    public SimpleStringProperty descProperty() {
        return desc;
    }

    public void setDesc(String desc) {
        if(!StringUtils.equals(getDesc(),desc)){
            change = true;
        }
        this.desc.set(desc);
    }

    public String getOwnedAppAssetId() {
        return ownedAppAssetId.get();
    }

    public SimpleStringProperty ownedAppAssetIdProperty() {
        return ownedAppAssetId;
    }

    public void setOwnedAppAssetId(String ownedAppAssetId) {
        this.ownedAppAssetId.set(ownedAppAssetId);
    }

    public String getLocationAssetId() {
        return locationAssetId.get();
    }

    public SimpleStringProperty locationAssetIdProperty() {
        return locationAssetId;
    }

    public void setLocationAssetId(String locationAssetId) {
        this.locationAssetId.set(locationAssetId);
    }
}